<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>index</title>
    <style>
	#pageHeight{
	  height:1300px
	}
    </style>
</head>
<body>
<div id="container">首页</div>
<a href="file:///data/storage/el1/bundle/phone/resources/rawfile/second.html" id="fileAccess">打开rawfile文件</a>
<img src="file:///data/storage/el1/bundle/phone/resources/rawfile/icon.png" alt="icon" id="img">
</body>
<script>
    let ele=document.getElementById("img");
    let loadImage;
    ele.onload=function(){
        loadImage="load complete"
    }
    function getUserAgent(){
        return navigator.userAgent
    }
    function test(){
        backToEts.test("backToEts")
    }
    function testRunJavaScript(){
        return "testRunJavaScript"
    }
    function getPageHeight(){
        let height=document.body.scrollHeight
        return height
    }
    function proxy(){
        objName.register("backToEts")
    }
    function registerTest(){
        let str=objName.register();
        console.log(str);
        return str
    }
    function jsAccess(){
        console.log("web111")
    }
    function consoleTest(){
        console.log("console test")
    }
    function alertTest(){
        alert('alert test')
    }
    function confirmTest(){
        confirm("confirm test")
    }
    function getImgResult(){
        return loadImage
    }
    function toPrompt(){
        let result=prompt("age","20");
        console.log("result:"+result)
    }
    function openRawFile(){
        document.getElementById("fileAccess").click()
    }
    function htmlTest(){
        let str = objName.testOne('Web')
        return str
    }
    function getStringForJs() {
        return "hello, world";
    }
    function getNumForJs() {
        return 1;
    }
    function getBooForJs() {
        return true;
    }
    function getArrayBufferForJs() {
        const buffer = new ArrayBuffer(8);
        const view = new Int32Array(buffer);
        return view;
    }
    function getArrayForJs() {
        const fruits = [];
        fruits.push("banana", "apple", "peach");
        return fruits;
    }
</script>
</html>
